﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ManageUsers.aspx.cs" Inherits="AteckCsharp.Account.ManageUsers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:SqlDataSource ID="SqlDataSourceForRoles" runat="server" 
            ConnectionString="<%$ ConnectionStrings:fadi %>" 
            SelectCommand="SELECT UserName FROM aspnet_Users">
    </asp:SqlDataSource>
    <div align="center">
        <h4>Edit User&#39;s Role</h4>
    </div>
     
    <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
        DataSourceID="SqlDataSourceForRoles" ForeColor="#333333" GridLines="None" 
        Height="16px" HorizontalAlign="Center" 
        onselectedindexchanged="GridView2_SelectedIndexChanged" PageSize="8" 
        RowStyle-HorizontalAlign="Center" Width="531px">
        <RowStyle BackColor="#EFF3FB" />
        <Columns>
            <asp:BoundField DataField="UserName" HeaderText="UserName" 
                SortExpression="UserName" />
            <asp:TemplateField HeaderText="IsUserInRole? Assign a Role">
                <ItemTemplate>
                    <asp:Repeater ID="UsersRoleList" runat="server">
                        <ItemTemplate>
                            <asp:CheckBox ID="RoleCheckBox" runat="server" AutoPostBack="true" 
                                OnCheckedChanged="RoleCheckBox_CheckChanged" Text="<%#Container.DataItem %>" />
                                <br />
                            </ItemTemplate>
                    </asp:Repeater>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ShowSelectButton="True" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>

</asp:Content>
